package com.lbw.factory.factorymethod.order;


import com.lbw.factory.factorymethod.pizza.BJCheesePizza;
import com.lbw.factory.factorymethod.pizza.BJPepperPizza;
import com.lbw.factory.factorymethod.pizza.Pizza;

/**
 * @author lbw
 * @version 1.0
 * @date 2021/10/15 20:20
 */
public class BJOrderPizza extends OrderPizza {
    @Override
    Pizza createPizza(String orderType) {
        Pizza pizza = null;

        switch (orderType) {
            case "cheese":
                pizza = new BJCheesePizza();
                break;
            case "pepper":
                pizza = new BJPepperPizza();
                break;
        }
        return pizza;
    }
}
